/**
 * Author:runlin。tang.
 * Creation Time: 2016/6/29
 * Description:
 *            get_ssid_list
 */

define(['jquery','../m/ulList'], function ($,ulList) {
    function getSsidList () {
        $('.getSsid').on('click', function(event) {
            ulList();
            var obj = $(this).parent();
            //setTimeout(function(){
            //    obj.toggleClass('darkgreay_b');
            //    if (obj.hasClass('darkgreay_b')) {
            //        obj.siblings('.name-list').show();
            //    }
            //    else{
            //        obj.siblings('.name-list').hide();
            //    }
            //},300);
            obj.find('ul').show();
            event.stopPropagation();
        });
        $('.ly-pppoe').on('click','.select li', function(event) {
            $('.select input').val($(this).text());
            var mac = $(this).attr('mac');
            $('.select input').attr('mac',mac);
            $(this).addClass('chosed').siblings('li').removeClass('chosed');
            $(this).parents('.name-list').hide();
            $(this).parent().prev().removeClass('darkgreay_b');
            event.stopPropagation();
        });
    }
    return getSsidList;
});